﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Tetris
{
    /// <summary>
    /// Interaktionslogik für GameOver.xaml
    /// </summary>
    public partial class GameOver : Window
    {
        int score;
        IPAddress ipv4;
        string name;
        public GameOver(int s, IPAddress ip, string na)
        {
            InitializeComponent();
            score = s;
            ipv4 = ip;
            name = na;
        }

        client client;
        private void btnsend_Click(object sender, RoutedEventArgs e)
        {
            client = new client(ipv4, 5000, name);
            string message = Convert.ToString(score);
            client.Write(message);
        }
    }
}
